//对象处理成数组 { s202201: 100 } => [100,0,0,0,0,0,0,0,0,0,0,0]
export function handle_obj(obj){
  if(!obj){ return [] }
  let result = new Array(12).fill(null);
  for(let key in obj){
    let index = key.slice(5, 7) - 1;
    result[index] = obj[key];
  }
  // let keys = Object.keys(obj);
  // for(let i = 0,month=1; month <= 12; month++){
  //   let key = keys[i];
  //   if(key.slice(5, 7) == month){
  //     result.push(obj[key]);
  //     i++;
  //   } else {
  //     result.push(0);
  //   }
  // }
  console.log(result);
  return result;
}